<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page contentType="text/html" pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html xmlns="http://www.w3.org/1999/xhtml" lang="pt-br">
    <head>
        <title>NTI | SEFIN | PCR</title>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
        <meta http-equiv="cache-control" content="no-cache" />
        <meta http-equiv="expires" content="3600" />
        <link rel="stylesheet" type="text/css" media="screen,projection,print" href="./pub/css/estilo.css" />
        <link rel="stylesheet" type="text/css" media="screen,projection,print" href="./pub/css/auxiliar.css" />
        <link rel="stylesheet" type="text/css" media="screen,projection,print" href="./pub/css/dropdown.css" />
        <link rel="stylesheet" type="text/css" media="screen,projection,print" href="./pub/css/default.ultimate.css" />
        <link rel="icon" type="image/x-icon" href="./pub/img/favicon.ico" />
        <script type="text/javascript" src="./pub/js/funcoes.js"></script>
        <script type="text/javascript" src="./pub/js/jquery-1.2.6.pack.js"></script>
        <script type="text/javascript" src="./pub/js/jquery.maskedinput-1.1.3.pack.js"></script>
        <script type="text/javascript">
            function action(rn){
                document.getElementById("acao").value = rn;
                document.getElementById("formulario").submit();
            }
        </script>
    </head>
    <body>
        <c:import url="//inc/pagetop.jsp" />
        <div id="pagecontainer">
            <c:import url="//inc/menutop.jsp" />
            <div class="conteudo">
                <div id="top">
                    <h2>Akese</h2>
                    <h3>${msg}</h3>
                </div>
                <div class="formulario">
                    <fieldset>
                        <legend>${titulo}</legend>
                        <form action="main" method="post">
                            <input type="hidden" name="acao" value="orgaoSalvar" />

                            <label for="codigo">Código <font color="red">*</font> :</label>
                            <input class="campo" type="text" name="codigo" id="codigo" value="${bean.codigo}" maxlength="20" title="CÃ³digo para referência nos sistemas legados" /><br/>

                            <label for="sigla">Sigla <font color="red">*</font> :</label>
                            <input type="text" name="sigla" id="sigla" value="${bean.sigla}" maxlength="20" title="Sigla ou nome abreviado" /><br/>

                            <label for="administracao">Administração <font color="red">*</font> :</label>
                            <input type="text" name="administracao" id="administracao" value="${bean.administracao}" maxlength="100" title="Tipo de administração (Direta/Indireta...)" /><br/>

                            <label for="nome">Nome <font color="red">*</font> :</label>
                            <input type="text" name="nome" id="nome" value="${bean.nome}" size="50" maxlength="200" title="Nome completo" /><br/>

                            <label for="idOrgaoPai">Subordinado a:</label>
                            <select name="idOrgaoPai" id="idOrgaoPai" title="Órgão ao qual este estará subordinado">
                                <option value="">Selecione...</option>
                                <c:forEach var="item" items="${orgaos}">
                                    <option value="${item.id}">${item.sigla}</option>
                                </c:forEach>
                            </select><br/>

                            <br/>

                            <input class="inptcheck" type="checkbox" name="status" id="status" value="1" checked="checked" /> 
                            <label class="lblcheck" for="status">Cadastrar como "Ativo"</label><br/>

                            <br/>

                            <input type="reset" value="Limpar" />
                            <input type="submit" value="Salvar" />
                        </form>
                    </fieldset>
                </div><!--formulario-->
                <div class="tabela">
                    <table>
                        <thead><tr>
                                <th>ID</th>
                                <th>Código</th>
                                <th>Sigla</th>
                                <th>Administração</th>
                                <th>Nome</th>
                                <th>Hierarquia</th>
                                <th></th>
                        </tr></thead>
                        <tbody>
                            <c:forEach var="item" items="${orgaos}">
                                <tr>
                                    <td>${item.id}</td>
                                    <td>${item.codigo}</td>
                                    <td>${item.sigla}</td>
                                    <td>${item.administracao}</td>
                                    <td>${item.nome}</td>
                                    <td>${item.idOrgaoPai}</td>
                                    <td>editar excluir</td>
                                </tr>
                            </c:forEach>
                        </tbody>
                    </table>
                </div><!--tabela-->
            </div><!--conteudo-->
        </div><!--pagecontainer-->
        <c:import url="//inc/pagefooter.jsp" />
    </body>
</html>
